﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace XboxUserInterface.Forms
{
    public partial class NameInput : Form
    {
        private SettingsForm _parent;
        private bool open = true;

        public bool Open
        {
            get { return open; }
        }

        public NameInput(SettingsForm parent)
        {
            _parent = parent;
            InitializeComponent();
            this.FormClosing += new FormClosingEventHandler(NameInput_FormClosing);
        }

        void NameInput_FormClosing(object sender, FormClosingEventArgs e)
        {
            open = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            _parent.Map.SchemeName = textBox1.Text;
            this.Close();
        }

        private void NameInput_Activated(object sender, EventArgs e)
        {
            textBox1.Focus();
        }
    }
}
